<?php

class MissingFieldException extends ModelException
{

    function __construct($name, $path = null, $model)
    {
        if ($path) $path = $model . '.' . (join('.', $path));
        else $path = $model;
        parent::__construct("$path: $name", ModelException::MISSING_FIELD);
    }

}